package file;

import java.io.File;

public class ListFileDemo {
    public static void main(String[]args){
        File dir=new File(".");
        if (dir.isDirectory()){
            File[]subs=dir.listFiles();
            for (int i = 0; i < subs.length; i++) {
                String name=subs[i].getName();
                System.out.println(name);
            }
        }

    }
}
